﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Entity;
using TruckingApplication.Dal.EntityModels;
using System.Data.Entity.ModelConfiguration.Conventions;

namespace TruckingApplication.Dal
{
    public class EntitiesContext : DbContext
    {
        public DbSet<ADVANCE> Advances { get; set; }
        public DbSet<ALERT> Alerts { get; set; }
        public DbSet<COMPANY> Companies { get; set; }
        public DbSet<COMPANY_TYPE> CompanyTypes { get; set; }
        public DbSet<INSURANCE> Insurances { get; set; }
        public DbSet<LOG> Logs { get; set; }
        public DbSet<ORDER> Orders { get; set; }
        public DbSet<ORDER_ADVANCE> OrderAdvances { get; set; }
        public DbSet<ORDER_RESOURCE> OrderResources { get; set; }
        public DbSet<ORDER_STATUS> OrderStatuses { get; set; }
        public DbSet<PAYMENT> Payments { get; set; }
        public DbSet<RESOURCE> Resources { get; set; }
        public DbSet<RESOURCE_COMPANY> ResourceCompanies { get; set; }
        public DbSet<RESOURCE_PAYMENT> ResourcePayments { get; set; }
        public DbSet<RESOURCE_TYPE> ResourceTypes { get; set; }
        public DbSet<ROADSIDE_ASSISTANCE> ResourceAssistances { get; set; }
        public DbSet<TRAILER> Trailers { get; set; }
        public DbSet<TRAILER_LOG> TrailerLogs { get; set; }
        public DbSet<TRAILER_TYPE> TrailerTypes { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Conventions.Remove<PluralizingTableNameConvention>();
        }
    }
}
